﻿using Windows.SeedWork;

namespace Windows.Admin.Domain
{
    public class Organization: FullEntity<long>
    {
        public Organization() 
        {
            Posts = new HashSet<Post>();
            Role_Organizations = new HashSet<Role_Organization>();
            Organization_Employees = new HashSet<Organization_Employee>();
        }
        /// <summary>
        /// 组织机构级别字符串
        /// </summary>
        public string? Level { get; set; }
        /// <summary>
        /// 父Id
        /// </summary>
        public long? PId { get; set; }
        /// <summary>
        /// 组织机构编码
        /// </summary>
        public string Code { get; set; } = "";
        /// <summary>
        /// 组织机构名称
        /// </summary>
        public string Name { get; set; } = "";
        /// <summary>
        /// 电话号码
        /// </summary>
        public string? Telephone { get; set; } 
        /// <summary>
        /// 传真
        /// </summary>
        public string? Fax { get; set; }
        /// <summary>
        /// 邮箱
        /// </summary>
        public string? Email { get; set; }
        /// <summary>
        /// 排序
        /// </summary>
        public int? Sort { get; set; }
        /// <summary>
        /// 备注
        /// </summary>
        public string? Remark { get; set; }
        public virtual ICollection<Post> Posts { get; set; }
        public virtual ICollection<Role_Organization> Role_Organizations { get; set; }
        public virtual ICollection<Organization_Employee> Organization_Employees { get; set; }
    }
}
